<template>
  <view :style="themeColor">
    <view class="page">
      <view class="flex align-stretch benben-position-layout flex myMoney_flex_0"
        :style="{height:(88+StatusBarRpx)+'rpx',paddingTop:StatusBarRpx+'rpx', }">
        <view class='flex align-center justify-between flex-sub myMoney_fd0_0'>
          <view class='flex align-center myMoney_fd0_0_c0' @tap.stop="handleJumpDiy" data-type="back" data-url="1">
            <text class='fu-iconfont2  myMoney_fd0_0_c0_c0'>&#xE794;</text>
          </view>
          <view class='flex align-center'>
            <text class='myMoney_fd0_0_c1_c0'>库存记录</text>
          </view>
          <view class='flex align-center justify-end myMoney_fd0_0_c0'>
          </view>
        </view>

      </view>
      <view :style="{height: (88+StatusBarRpx)+'rpx'}"></view>

      <view class="flex flex-direction flex-wrap align-stretch benben-flex-layout myMoney_flex_1">
        <view class='flex flex-direction flex-wrap align-center justify-between myMoney_fd1_0'>
          <view class='flex flex-wrap align-center justify-between myMoney_fd1_0_c0'>
            <text class='myMoney_fd1_0_c0_c0'>·当前库存</text>
            <view class='flex flex-wrap align-center self-center justify-center myMoney_fd1_0_c0_c1'
              @tap.stop="handleJumpDiy" data-type="navigateTo" :data-url="`/pages/grzx/editRcord/editRcord`">
              <text class='myMoney_fd1_0_c0_c1_c0'>修改库存</text>
            </view>
          </view>
          <view class='flex flex-wrap align-center justify-around myMoney_fd1_0_c1'>
            <view class='flex flex-direction flex-wrap align-center self-center justify-center myMoney_fd1_0_c1_c0'
              v-for="(itemC,indexC) in wallet" :key="indexC">
              <text>{{itemC.stock}}</text>
              <!-- {{unit}} -->
              <text class='myMoney_fd1_0_c1_c0_c1'>{{itemC.name}}</text>
            </view>
            <!--       <view class='flex flex-direction flex-wrap align-center self-center justify-center myMoney_fd1_0_c1_c0'>
              <text>40</text>
              <text class='myMoney_fd1_0_c1_c0_c1'>三元锂</text>
            </view>
            <view class='flex flex-direction flex-wrap align-center self-center justify-center myMoney_fd1_0_c1_c0'>
              <text>40</text>
              <text class='myMoney_fd1_0_c1_c0_c1'>磷酸铁锂</text>
            </view>
            <view class='flex flex-direction flex-wrap align-center self-center justify-center myMoney_fd1_0_c1_c0'>
              <text>40</text>
              <text class='myMoney_fd1_0_c1_c0_c1'>三元锂</text>
            </view> -->
          </view>
        </view>
      </view>


      <!---flex布局flex布局开始-->
      <view class="flex flex-direction flex-wrap align-stretch benben-flex-layout myMoney_flex_2">
        <view class='flex flex-direction align-stretch myMoney_fd2_0'>
          <text class='myMoney_fd2_0_c0'>· 记录</text>
          <view class='flex flex-wrap align-center flex-sub myMoney_fd2_0_c1' v-for="(item,index) in dataList"
            :key="index">
            <view class='flex flex-wrap align-center'>
              <view class='flex flex-wrap align-center myMoney_fd2_0_c1_c0_c0'>
                <text class='myMoney_fd2_0_c1_c0_c0_c0'>型号</text>
                <text>{{item.freerecyclingtype_name}}</text>
              </view>
            </view>
            <view class='flex flex-wrap align-center justify-between myMoney_fd2_0_c1_c1'>
              <view class='flex flex-wrap align-center'>
                <view class='flex flex-wrap align-center'>
                  <text class='myMoney_fd2_0_c1_c0_c0_c0'>数量</text>
                  <text>{{item.num}}</text>
                </view>
              </view>
              <view class='flex flex-wrap align-center myMoney_fd2_0_c1_c0_c0'>
                <text class='myMoney_fd2_0_c1_c1_c1_c0'>记录时间：{{item.create_time}}</text>
              </view>
            </view>
          </view>
        </view>
      </view>

      <!---flex布局flex布局结束-->


    </view>
  </view>
</template>
<script>
  import {
    validate
  } from '@/common/utils/validate.js'

  export default {
    components: {},


    data() {
      return {
        "dataList": [],
        "wallet": []
      };
    },
    computed: {
      themeColor() {
        return this.$store.getters.themeColor
      },

    },
    watch: {},
    onLoad(options) {

    },
    onUnload() {

    },
    onReady() {

    },
    onShow() {
      this.getListFunc()
      this.walletManagementFunc()
    },
    onHide() {

    },
    onResize() {

    },
    onPullDownRefresh() {

    },
    onReachBottom(e) {

    },
    onPageScroll(e) {

    },
    methods: {
      //钱包-余额明细
      async getListFunc() {
        //请求方法
        //数据验证

        let datadataList = await this.$api.get(global.apiUrls.post65d1d342a6a84, {

        });

        if (datadataList.data.code != 1) {
          this.$message.info(datadataList.data.msg);
          return
        }
        let infodataList = datadataList.data.data;
        this.dataList = infodataList.data

      },
      //钱包管理
      async walletManagementFunc() {
        //请求方法
        //数据验证

        let datawallet = await this.$api.get(global.apiUrls.post65d1d4061848a, {

        });

        if (datawallet.data.code != 1) {
          this.$message.info(datawallet.data.msg);
          return
        }
        let infowallet = datawallet.data;
        this.wallet = infowallet.data

      }
    }
  };
</script>
<style lang="scss" scoped>
  .page {
    width: 100vw;
    overflow-x: hidden;
    min-height: calc(100vh - var(--window-bottom));
    background: url(image-path('58.png')) no-repeat;
    background-size: 100% auto;
  }

  .myMoney_flex_0 {
    background: url(image-path('53.png')) no-repeat;
    width: 750rpx;
    height: 88rpx;
    overflow: hidden;
    z-index: 10;
    top: 0rpx;
    background-size: 100% auto !important;
  }

  .myMoney_fd0_0_c1_c0 {
    font-size: 36rpx;
    font-weight: 500;
    color: #fff;
  }

  .myMoney_fd0_0_c0_c0 {
    font-size: 32rpx;
    font-weight: 500;
    color: #fff;
  }

  .myMoney_fd0_0_c0 {
    width: 180rpx;
  }

  .myMoney_fd0_0 {
    padding: 0rpx 32rpx 0rpx 32rpx;
    line-height: 88rpx;
  }

  .myMoney_flex_1 {
    background: url(image-path('53.png')) no-repeat;
    background-size: 100% auto !important;
  }

  .myMoney_fd1_0_c1_c0_c1 {
    font-size: 28rpx;
  }

  .myMoney_fd1_0_c1_c0 {
    color: var(--benbenFontColor3);
    font-size: 44rpx;
  }

  .myMoney_fd1_0_c1 {
    width: 710rpx;
    padding: 40rpx 0rpx 20rpx 0rpx;
  }

  .myMoney_fd1_0_c0_c1_c0 {
    color: var(--benbenFontColor3);
  }

  .myMoney_fd1_0_c0_c1 {
    border: 1px solid #FFFFFF;
    border-radius: 24rpx 24rpx 24rpx 24rpx;
    width: 149rpx;
    height: 48rpx;
  }

  .myMoney_fd1_0_c0_c0 {
    font-size: 32rpx;
    color: var(--benbenFontColor3);
  }

  .myMoney_fd1_0_c0 {
    width: 710rpx;
  }

  .myMoney_fd1_0 {
    padding: 24rpx 24rpx 150rpx 24rpx;
  }

  .myMoney_flex_2 {
    background: transparent;
    background-size: 100% auto !important;
    padding: 20rpx 0rpx 0rpx 0rpx;
  }

  .myMoney_fd2_0_c1_c1_c1_c0 {
    width: 300rpx;
    color: var(--benbenFontColor2);
  }

  .myMoney_fd2_0_c1_c1 {
    width: 686rpx;
  }

  .myMoney_fd2_0_c1_c0_c0_c0 {
    width: 120rpx;
    color: var(--benbenFontColor2);
  }

  .myMoney_fd2_0_c1_c0_c0 {
    line-height: 70rpx;
    height: 70rpx;
  }

  .myMoney_fd2_0_c1 {
    border-bottom: 1px solid #eee;
  }

  .myMoney_fd2_0_c0 {
    border-bottom: 1px solid #eee;
    line-height: 88rpx;
    font-size: 32rpx;
    font-weight: 500;
    color: var(--benbenFontColor0);
    width: 99%;
  }

  .myMoney_fd2_0 {
    background: rgba(255, 255, 255, 1);
    position: relative;
    top: -100rpx;
    background-size: 100% auto;
    width: 686rpx;
    border-radius: 16rpx;
    margin: 0rpx auto 0rpx auto;
    padding: 24rpx;
  }
</style>
